﻿<!DOCTYPE html>
<html>
	<meta charset="UTF-8"/>
	<head>
		<script>
			//计算两个数字的和
			function compute(a,b,sign){
				
				switch(sign){
					case "+" : console.log(a+b); break;
					case "-" : console.log(a-b); break;
					case "*" : console.log(a*b); break;
					case "/" : console.log(a/b); break;
					case "%" : console.log(a%b); break;
				}
			}
			
			function 函数名(){
				//你的代码
			}
			
			
			
			//打印一个九九乘法表
			function jiujiu(){
				for(var i=1; i<=9; i++){
					for(var k=1; k<=i; k++){
						document.write(i+"X"+k+"="+i*k+"&nbsp;&nbsp;");
					}
					document.write("<br>");
				}
			}
			jiujiu();
		</script>
	</head>
	<body>
		
		<button onclick="compute(5,28,'*')">点我</button>
	</body>	
</html>











